package com.xq.controller;

import com.xq.apis.DmsDeviceApis;
import com.xq.constants.ErrorCodeConstants;
import com.xq.dto.DmsDevice.*;
import com.xq.query.DmsDeviceTypeListQuery;
import com.xq.service.IDmsDeviceTypesService;
import com.xq.vo.JsonVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;

@Api(tags = "设备管理")
@RestController
@RequestMapping("/dms-device")
public class DmsDeviceController implements DmsDeviceApis {

    @Autowired
    private IDmsDeviceTypesService dmsDeviceTypesService;

    @ApiOperation("插入设备类型")
    @PostMapping("/insert-device-type")
    @Override
    public JsonVO<String> insertDeviceType(@RequestBody DmsDeviceTypeInsertDTO dmsDeviceTypeInsertDTO) {
        dmsDeviceTypesService.insertDeviceTypes(dmsDeviceTypeInsertDTO);
        return JsonVO.success(ErrorCodeConstants.SUCCESS);
    }

    @Override
    public JsonVO<String> deleteDeviceType(DmsDeviceTypeDeleteDTO dmsDeviceTypeDeleteDTO) {
        return null;
    }

    @Override
    public JsonVO<String> updateDeviceType(DmsDeviceTypeUpdateDTO dmsDeviceTypeUpdateDTO) {
        return null;
    }

    @ApiOperation("查找设备类型")
    @GetMapping("/list-device-type")
    @Override
    public JsonVO<List<DmsDeviceTypeListDTO>> listDeviceTypes(DmsDeviceTypeListQuery dmsDeviceTypeListQuery) {
        List<DmsDeviceTypeListDTO> deviceTypeList = dmsDeviceTypesService.getDeviceTypeList(dmsDeviceTypeListQuery);
        return JsonVO.success(deviceTypeList);
    }

    @Override
    public JsonVO<String> insertDevice(DmsDeviceInsertDTO dmsDeviceInsertDTO) {
        return null;
    }

    @Override
    public JsonVO<String> deleteDevice(String deviceId) {
        return null;
    }

    @Override
    public JsonVO<String> updateDevice(DmsDeviceUpdateDTO dmsDeviceUpdateDTO) {
        return null;
    }

    @Override
    public JsonVO<String> listDevice(DmsDeviceListDTO dmsDeviceListDTO) {
        return null;
    }

    @Override
    public JsonVO<String> insertDeviceOperation(DmsDeviceOperationInsertDTO dmsDeviceOperationInsertDTO) {
        return null;
    }

    @Override
    public JsonVO<String> deleteDeviceOperation(String deviceId) {
        return null;
    }

    @Override
    public JsonVO<String> updateDeviceOperation(DmsDeviceOperationUpdateDTO dmsDeviceOperationUpdateDTO) {
        return null;
    }

    @Override
    public JsonVO<String> listDeviceOperation(DmsDeviceOperationListDTO dmsDeviceOperationListDTO) {
        return null;
    }

    @Override
    public JsonVO<String> postDeviceOperation(String operationId) {
        return null;
    }

    @Override
    public JsonVO<String> setDeviceOwnerAndOrganization(DmsDeviceManageDTO dmsDeviceManageDTO) {
        return null;
    }
}
